package cn.zqy.demo.day08;

/** static关键字：如果一个成员变量使用static，则这个变量不属于自己，而是属于类。 */
public class Demo01StaticField {
    public static void main(String[] args) {
        Student s1 = new Student("诸葛亮",45);
        s1.room = "北大穷年";
        System.out.println("姓名：" + s1.getName() + "年龄：" + s1.getAge() +"学号：" + s1.getId() +"教室：" + s1.room);


        Student s2 = new Student("赵子龙",76);
        System.out.println("姓名：" + s2.getName() + "年龄：" + s2.getAge() +"学号：" + s2.getId() +"教室：" + s2.room);
    }
}
